package com.qian.ddj.web.controller;

import com.qian.api.ddj.model.CountModel;
import com.qian.api.ddj.model.CountResultModel;
import com.qian.api.ddj.service.IOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("ddj/count")
@Api(tags = "交易统计")
public class CountController {
    @Autowired
    private IOrderService orderService;

    @ApiOperation("统计")
    @GetMapping
    public List<CountResultModel> count(CountModel countModel) {
        List<CountResultModel> count = orderService.count(countModel);
        return count;
    }

}
